package com.itheima_12;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class test_12_1 {
    public static void main(String[] args) {
        HashMap<String,String> map=new HashMap<>();
        map.put("男1号","女1号");
        map.put("男2号","女2号");
        map.put("男3号","女3号");
        map.put("男4号","女4号");
        map.put("男5号","女5号");
       /* Set<String> key = map.keySet();
        for (String keys : key) {
            String s = map.get(keys);
            System.out.println(keys+"---"+s);
        }*/
        System.out.println("---------------------------");
        Set<Map.Entry<String, String>> entries = map.entrySet();
        for (Map.Entry<String, String> entry : entries) {
            String key = entry.getKey();
            String value = entry.getValue();
            System.out.println(key+"---"+value);
        }
    }
}
